package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DcLogModifica generated by hbm2java
 */
@Entity
@Table(name = "DC_LOG_MODIFICA", schema = "EDADEPUDOC")
public class DcLogModifica implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7919402179670033521L;
	private DcLogModificaId id;
	private Date fhmodificacion;
	private String cusuario;
	private Set<DcLogModDet> dcLogModDets = new HashSet<DcLogModDet>(0);

	public DcLogModifica() {
	}

	public DcLogModifica(DcLogModificaId id, Date fhmodificacion,
			String cusuario) {
		this.id = id;
		this.fhmodificacion = fhmodificacion;
		this.cusuario = cusuario;
	}

	public DcLogModifica(DcLogModificaId id, Date fhmodificacion,
			String cusuario, Set<DcLogModDet> dcLogModDets) {
		this.id = id;
		this.fhmodificacion = fhmodificacion;
		this.cusuario = cusuario;
		this.dcLogModDets = dcLogModDets;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iindice", column = @Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "ncorrelativo", column = @Column(name = "N_CORRELATIVO", nullable = false, precision = 5, scale = 0)) })
	public DcLogModificaId getId() {
		return this.id;
	}

	public void setId(DcLogModificaId id) {
		this.id = id;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dcLogModifica")
	public Set<DcLogModDet> getDcLogModDets() {
		return this.dcLogModDets;
	}

	public void setDcLogModDets(Set<DcLogModDet> dcLogModDets) {
		this.dcLogModDets = dcLogModDets;
	}

}
